/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Items;

import Actors.Actor;
import Actors.HumanControlledBall;
import ElementsProperties.ActorEntranceSensible;

/**
 *
 * @author vf
 */
public class Dynamite extends Bomb implements ActorEntranceSensible{

    @Override
    public void setProperties() {
        animImgs = 15;
        totalBurningTime = animImgs*50;
        explosionRadius = 1;//1 case dans chaque direction
        itemAnimation=createAnimImgs("./images/it-dynamite-burning.png");
    }

    @Override
    public void setImage() {
        itemImage=EnigmaUtils.ImageLoader.loadImage("./images/it-dynamite.png");
    }

    public void actorEnters(Actor a) {
        if(a instanceof HumanControlledBall)
            if(!isBurning) goToInventory();
    }

    public void actorLeaves(Actor a) {
    }

}